@extends('app')
@section('content')
    <div class="jumbotron">
        <div class="container">
            <h2 style="font-size: 60px;">濮阳欢迎你!</h2>
            <p><a class="btn btn-danger btn-lg pull-right" href="/discussion/create" role="button">发布新的帖子 »</a></p>
        </div>
    </div>
    <div class="container">
        <div class="row">
            <div class="col-d-9" role="mail">
                @foreach($discussions as $discussion)
                    <div class="media">
                        <div class="media-left">
                            <a href="">
                                <img class="media-object img-circle" src="{{ $discussion->user->avatar }}" alt="64*64" style="width: 64px">
                            </a>
                        </div>
                        <div class="media-body">
                            <h4 class="media-heading">
                                <a href="/discussion/{{ $discussion->id }}">{{ $discussion->title }}</a>
                                <div class="media-conversation-meta">
                                    <span class="media-conversation-replies">
                                        <a href="">{{ count($discussion->comments) }}</a>
                                        回复
                                    </span>
                                </div>

                            </h4>
                            {{ $discussion->user->name }}
                        </div>
                    </div>
                @endforeach
            </div>
        </div>
    </div>
    @stop
